<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const date = parseInt(prompt("请输入一个数"))
    const res = date >= 10 ? date : "0" + date
    alert(res)
</script>
</body>
</html>